package waterweight;

import java.util.logging.Logger;

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

public class Main extends JavaPlugin {
	Logger logger = Logger.getLogger("Minecraft");
	public static Main plugin;

	@Override
	public void onEnable() {
		this.logger.info("Go");
	}

	@Override
	public void onDisable() {
		this.logger.info("Stop");

	}

	public static boolean areThereTooManyItems(PlayerInventory inv) {
		Player p = (Player) inv.getHolder();
		if (inv.getContents().length > 100) {
			p.sendMessage(ChatColor.BLUE
					+ "Your Carrying too many items! This Will Slow You Down!");
			p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1, 1));
			return true;
		} else {
			return false;
		}
	}
}
